home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / cf / hpLib.rules < prev    next >
Text File  |  1995-07-12  |  3KB  |  105 lines

  1. XCOMM $XConsortium: hpLib.rules,v 1.4 93/09/11 17:57:18 rws Exp $
  2.  
  3. /*
  4.  * HP shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef SharedDataSeparation
  11. #define SharedDataSeparation NO
  12. #endif
  13. #ifndef SharedCodeDef
  14. #define SharedCodeDef /**/
  15. #endif
  16. #ifndef SharedLibraryDef
  17. #define SharedLibraryDef /**/
  18. #endif
  19. #ifndef ShLibIncludeFile
  20. #define ShLibIncludeFile <hpLib.tmpl>
  21. #endif
  22. #ifndef SharedLibraryLoadFlags
  23. #define SharedLibraryLoadFlags -b
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #define PositionIndependentCFlags +z
  27. #endif
  28. #ifndef UseInstalled
  29. #define ExtraLoadOptions -L$(USRLIBDIR)
  30. #endif
  31.  
  32. /*
  33.  * InstallSharedLibrary - generate rules to install the shared library.
  34.  */
  35. #ifndef InstallSharedLibrary
  36. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  37. install:: Concat(lib,libname.sl.rev)                     @@\
  38.     MakeDir($(DESTDIR)dest)                        @@\
  39.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.sl.rev) $(DESTDIR)dest @@\
  40.     $(RM) Concat($(DESTDIR)dest/lib,libname.sl)            @@\
  41.     $(LN) Concat(lib,libname.sl.rev) Concat($(DESTDIR)dest/lib,libname.sl)
  42.  
  43. #endif /* InstallSharedLibrary */
  44.  
  45. /*
  46.  * InstallSharedLibraryData - generate rules to install the shared library data
  47.  */
  48. #ifndef InstallSharedLibraryData
  49. #define    InstallSharedLibraryData(libname,rev,dest)
  50. #endif /* InstallSharedLibraryData */
  51.  
  52.  
  53. /*
  54.  * SharedCplusplusLibraryTarget - generate rules to create a shared C++
  55.  * library; use $(CXXLINK) instead of $(LD) in case the library needs
  56.  * global constructors to be called.
  57.  *
  58.  * Not tested yet; send any bug fixes to fresco@x.org.
  59.  */
  60. #ifndef SharedCplusplusLibraryTarget
  61. #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
  62. AllTarget(Concat(lib,libname.sl.rev))                    @@\
  63.                                     @@\
  64. Concat(lib,libname.sl.rev):  solist                    @@\
  65.     $(RM) $@                            @@\
  66.     $(CXXLINK) -o $@ $(SHLIBLDFLAGS) solist need_libs        @@\
  67.     $(RM) Concat(lib,libname.sl)                    @@\
  68.     $(LN) $@ Concat(lib,libname.sl)                    @@\
  69.                                     @@\
  70. clean::                                    @@\
  71.     $(RM) Concat(lib,libname.sl.rev) Concat(lib,libname.sl)
  72.  
  73. #endif /* SharedCplusplusLibraryTarget */
  74.  
  75. /*
  76.  * SharedLibraryTarget - generate rules to create a shared library;
  77.  * build it into a different name so that we do not hose people by having
  78.  * the library gone for long periods.
  79.  */
  80. #ifndef SharedLibraryTarget
  81. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  82. AllTarget(Concat(lib,libname.sl.rev))                    @@\
  83.                                     @@\
  84. Concat(lib,libname.sl.rev):  solist                    @@\
  85.     $(RM) $@~                            @@\
  86.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist)        @@\
  87.     $(RM) $@                             @@\
  88.     $(MV) $@~ $@                            @@\
  89.     $(RM) Concat(lib,libname.sl)                    @@\
  90.     $(LN) $@ Concat(lib,libname.sl)                    @@\
  91.     LinkBuildLibrary($@)                        @@\
  92.     LinkBuildLibrary(Concat(lib,libname.sl))            @@\
  93.                                     @@\
  94. clean::                                    @@\
  95.     $(RM) Concat(lib,libname.sl.rev) Concat(lib,libname.sl)
  96.  
  97. #endif /* SharedLibraryTarget */
  98.  
  99. /*
  100.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  101.  */
  102. #ifndef SharedLibraryDataTarget
  103. #define SharedLibraryDataTarget(libname,rev,salist)
  104. #endif /* SharedLibraryTarget */
  105.